<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./WEB-INF/templates/mainTemplate.xhtml">

            <ui:define name="top">
                Munchkin Quest - Setup
            </ui:define>

            <ui:define name="left">
            </ui:define>

            <ui:define name="right">
            </ui:define>

            <ui:define name="content">
                <h:form>
                    <h:panelGrid columns="3">
                        <h:outputText value="Total Health"/>
                        <h:inputText id="tothealth" value="#{stepBean.totalHealth}" 
                                     styleClass="initinputs"
                                     converter="javax.faces.Integer" 
                                     required ="true"
                                     requiredMessage="#{msgs.totHealthNeeded}">
                            <f:validateLongRange minimum="0" maximum="8"/>
                        </h:inputText>   
                        <h:message for="tothealth"/>
                        <h:outputText value="Current Health"/>

                        <h:inputText id="health" value="#{stepBean.health}" 
                                     styleClass="initinputs"
                                     converter="javax.faces.Integer" 
                                     required ="true"
                                     requiredMessage="#{msgs.healthNeeded}">
                            <f:validateLongRange minimum="0" maximum="8"/>
                        </h:inputText>   

                        <h:message for="health"/>
                        <h:outputText value="Total Movement"/>
                        <h:inputText id="totmovement" value="#{stepBean.totalMovement}" 
                                     styleClass="initinputs"
                                     converter="javax.faces.Integer" 
                                     required ="true"
                                     requiredMessage="#{msgs.totMovementNeeded}">
                            <f:validateLongRange minimum="0" maximum="8"/>
                        </h:inputText>   

                        <h:message for="totmovement"/>
                        <h:outputText value="Current Movement"/>
                        <h:inputText id="movement" value="#{stepBean.movement}" 
                                     styleClass="initinputs"
                                     converter="javax.faces.Integer" 
                                     required ="true"
                                     requiredMessage="#{msgs.movementNeeded}">
                            <f:validateLongRange minimum="0" maximum="8"/>
                        </h:inputText>   

                        <h:message for="movement"/>
                        <h:commandButton styleClass="genbtn" value="Start" 
                                         action="#{stepBean.startGuide}"  />
                        <h:commandButton styleClass="genbtn" value="Set Defaults" 
                                         action="initialise" 
                                         immediate="true"/>
                    </h:panelGrid>
                </h:form>
            </ui:define>

            <ui:define name="bottom">
            </ui:define>

            <ui:define name="messages">
            </ui:define>
        </ui:composition>

    </body>
</html>
